package org.dev.vlp.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * Description
 * Param
 * return
 * Author:86184
 * Date: 2023/1/12
 */
@Data
public class PublishCommentParam {
    @NotNull
    private int momentId;

    @NotBlank
    @Length(max = 200)
    private String content;

    @NotNull
    @Min(0)
    private int parentId;

    @NotNull
    @Min(0)
    private int replyToId;

    @Size(max = 9)
    @Valid
    private List<PublishMomentParam.Image> imageList;

    @Data
    public static class Image {
        @NotBlank
        @Length(max = 255)
        private String url;

        @NotNull
        private Integer width;

        @NotNull
        private Integer height;
    }
}
